package net.xdclass.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.xdclass.model.BannerDO;
import net.xdclass.service.BannerService;
import net.xdclass.service.base.BaseProductServer;
import net.xdclass.util.JsonData;
import net.xdclass.vo.BannerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 孙浩
 * @since 2022-04-24
 */
@Api(tags = "轮播图服务")
@RestController
@RequestMapping("/api/banner/v1")
public class BannerController {

  @Autowired
  private BannerService bannerService;

  @Autowired
  private BaseProductServer baseProductServer;

  /**
   * 查询轮播图列表
   */
  @ApiOperation(value = "查询轮播图列表")
  @GetMapping("/list")
  public JsonData list(){
    return JsonData.buildSuccess(bannerService.list());
  }

}

